<%@include file="/WEB-INF/taglibs/common/taglibs.jsp"%>

<%
  if (session.getAttribute("uiTheme") == null)
				session.setAttribute("uiTheme", "redmond");
%>
<%
  request.setAttribute("jsession_id", request.getSession().getId());
%>
<!-- dhtml libraries -->
<script type="text/javascript"
	src="<%=request.getContextPath()%>/javascripts/jquery/core/jquery-1.4.2.min.js"></script>
<script type="text/javascript"
	src="<%=request.getContextPath()%>/javascripts/jquery/plugins/validator/jquery.validate.js"></script>
<script type="text/javascript"
	src='<%=request.getContextPath()%>/javascripts/jquery/plugins/theme/<%=(String) request.getSession().getAttribute("uiTheme")%>/js/jquery-ui-1.8.5.custom.min.js'></script>
<link
	href='<%=request.getContextPath()%>/javascripts/jquery/plugins/theme/<%=(String) request.getSession().getAttribute("uiTheme")%>/css/jquery-ui-1.8.5.custom.css'
	rel="stylesheet" type="text/css">

<!-- dhtml libraries -->
<script type="text/javascript">
	$(document).ready(function() {
		var endindex=document.location.href.length;
		if(document.location.href.indexOf('?')>0)
			endindex=document.location.href.indexOf('?');
		var selectedLink="";
		if(document.location.href.indexOf('/admin/')>-1){
			selectedLink=document.location.href.substring(document.location.href.indexOf('/admin/'),endindex);
		}else if(document.location.href.indexOf('/serviceprovider/')>-1){
			selectedLink=document.location.href.substring(document.location.href.indexOf('/serviceprovider/'),endindex);
		}else {
			selectedLink=document.location.href.substring(document.location.href.indexOf('/users/'),endindex);
		}
		
		$("#menu li ").each(function(){
			if($(this).find('a').attr('href').indexOf(selectedLink)>-1)
				$(this).addClass("ui-state-active");
		});

		$("#submenu li ").each(function(){
			if($(this).find('a').attr('href').indexOf(selectedLink)>-1){
				$(this).addClass("ui-state-active");
				var mainMenuLink=$("#submenu").attr('parent');
				$("#menu li ").each(function(){
					if($(this).find('a').attr('href').indexOf(mainMenuLink)>-1)
						$(this).addClass("ui-state-active");
				});
			}
		});
	
		$("#menu li").addClass("ui-state-default");
		$("#menu li").hover(function() {
			$(this).addClass("ui-state-hover");
		}, function() {
			$(this).removeClass("ui-state-hover");
		}).mousedown(function() {
			$(this).addClass("ui-state-active");
		}).css({
			'cursor' : 'pointer'
		});
		$("#submenu li").addClass("ui-widget-content");
		$("#submenu li").hover(function() {
			$(this).addClass("ui-state-hover");
		}, function() {
			$(this).removeClass("ui-state-hover");
		}).mousedown(function() {
			$(this).addClass("ui-state-active");
		}).css({
			'cursor' : 'pointer'
		});

		$(".headerLink").mouseover(function() {
			$(this).addClass('ui-state-highlight');
		}).mouseout(function() {
			$(this).removeClass('ui-state-highlight');
		}).css({
			'cursor' : 'pointer',
			'width' : '5.5em',
			'color' : 'black'
		});

	});
</script>
<h1><spring:message code="sp.homepage.title" /></h1>
<c:import url="/WEB-INF/jsp/languageselection.jsp" />
<ul id="menu">
	<li >
	    <a href="<c:url value="/serviceprovider/spHome.htm"/>" title="">
	    <img src="<%=request.getContextPath()%>/images/home-icon.png" style="float:left; position:relative; border:none" width="32" height="25"/>
		<spring:message code="sp.menu.home" /> </a>
	</li>
    <li>
        <a href="<c:url value="/serviceprovider/taxpayer/new_application.htm"/>" title="">
        	<img src="<%=request.getContextPath()%>/images/Taxpayer.png" style="float:left; position:relative; border:none" width="35" height="25">
            <spring:message code="sp.menu.taxpayer" />
        </a>
    </li>
	<li>
	    <a href="<c:url value="/serviceprovider/transaction/new.htm"/>" title="">
	    	<img src="<%=request.getContextPath()%>/images/Bar-Chart.png" style="float:left; position:relative; border:none" width="35" height="25">
	    	<spring:message code="sp.menu.transaction" />
    	</a>
	</li>
	<li>
		<a href="<c:url value="/serviceprovider/order/view_orders.htm"/>" title="">
			<img src="<%=request.getContextPath()%>/images/Orders.png" style="float:left; position:relative; border:none" width="35" height="25">
			<spring:message code="sp.menu.orders" /> 
		</a>
	</li>
	<li>
		<a href="<c:url value="/users/view_users.htm"/>" title="">
			<img src="<%=request.getContextPath()%>/images/Payee.png" style="float:left; position:relative; border:none" width="35" height="25">
			<spring:message code="sp.menu.user" /> 
		</a>
	</li>
	<li>
        <a href="<c:url value="/serviceprovider/check/blank_check/blank_checks.htm"/>">
        	<img src="<%=request.getContextPath()%>/images/Check.png" style="float:left; position:relative; border:none" width="35" height="25">
        	<spring:message code="sp.menu.checks" /> 
       	</a>
   	</li>
	<li>
	    <a href="<c:url value="/serviceprovider/reports/reports.htm"/>">
	    	<img src="<%=request.getContextPath()%>/images/Line-Chart.png" style="float:left; position:relative; border:none" width="35" height="25">
			<spring:message code="sp.menu.reports" /> 
		</a>
	</li>
	<li>
		<a href="<c:url value="/users/view_my_user_details.htm"/>" title="">
			<img src="<%=request.getContextPath()%>/images/Profile.png" style="float:left; position:relative; border:none" width="35" height="25">
			<spring:message code="sp.menu.myprofile" /> 
		</a>
	</li>
	<li>
		<a href="<c:url value="/serviceprovider/faq/faq_home.htm"/>" title="">
			<img src="<%=request.getContextPath()%>/images/Info.png" style="float:left; position:relative; border:none" width="35" height="25">
			<spring:message code="sp.menu.support" /> 
		</a>
	</li>
	<li>
		<a href="<c:url value="/serviceprovider/contact/contactus_sp.htm"/>" title="">
			<img src="<%=request.getContextPath()%>/images/Contact.png" style="float:left; position:relative; border:none" width="35" height="25">
			<spring:message code="sp.menu.help" /> 
		</a>
	</li>
	<li><a href="<c:url value="/login/logon.htm"/>" title="Logout">
			<img src="<%=request.getContextPath()%>/images/Exit.png" style="float:left; position:relative; border:none" width="35" height="25">
			<spring:message code="sp.menu.logout" /> </a></li>
</ul>